<?php
return array(
	'tableName' => 'v_goods_agentable',
	'attributeLabels' => array(
		'provider_id' => '供应商',
		'provider.worker_name' => '供应商',
		'dealer.worker_name' => '经销商',
		'dealer_listing_status' => '上架状态',
		'title' => '商品名称',
		'price_dealer' => '经销价',
		'price_agent' => '代理价',
		'price_market' => '市场价',
	),
	
	'behaviors' => array(
		'userScope' => array(
			'class' => 'coms.behaviors.userScopes.DefaultScope',
			'relatedFields' => array(
				'provider_id',
				'dealer_id',
			),
		),
	),
	
	'relations' => array(
		'goods' => array(CActiveRecord::BELONGS_TO, 'Goods', 'goods_id'),
		'provider' => array(CActiveRecord::BELONGS_TO, 'WorkerAccount', 'provider_id'),
		'dealer' => array(CActiveRecord::BELONGS_TO, 'WorkerAccount', 'dealer_id'),
	),
	'pkName' => 'id',
 	
	'_import' => array(
		array('*', 'models.ActiveRecord//*'),
	),
);